<div class="title">
  <div class="left">
    编辑-企业员工
  </div>  
  <div class="right">
    <%= link_to '返回', employees_users_url, :method => :get, :remote => true, :class => 'crud back' %>
  </div>
</div>
<%= form_for user,
      :url => update_employee_user_url(user),
      :remote => true,
      :method => :put do |f| %>
  <dl class="grid_15">
    <dt class="grid_2">姓名：</dt>
    <dd class="grid_12"><%= f.text_field :full_name %></dd>
  </dl>        
  <dl class="grid_15">
    <dt class="grid_2">性别：</dt>
    <dd class="grid_9">
      <%= f.radio_button :sex, :unknown, :class => :no %> <%= label :user,:sex_unknow, t(:unknown) %>
      <%= f.radio_button :sex, :man, :class => :no %> <%= label :user,:sex_man, t(:man)  %>
      <%= f.radio_button :sex, :woman, :class => :no %> <%= label :user,:sex_woman, t(:woman)  %>
    </dd>
  </dl>
  <dl class="grid_15">
    <dt class="grid_2">手机号：</dt>
    <dd class="grid_12"><%= f.text_field :mobile %></dd>
  </dl>        
  <dl class="grid_15">
    <dt class="grid_2">邮箱：</dt>
    <dd class="grid_12"><%= f.text_field :email %></dd>
  </dl>        
  <dl class="grid_15">
    <dt class="grid_2">地址：</dt>
    <dd class="grid_12"><%= f.text_field :address %></dd>
  </dl>
  <dl class="grid_15">
    <dt class="grid_2">隶属于：</dt>
    <dd class="grid_12">
       <%Group.all.each do |group|%>
          <%= check_box_tag "user[group_ids][]", group.id, user.groups.include?(group) , :class => "no" %> <%= group.name %>
       <%end%>
    </dd>
  </dl>
  <dl class="grid_15">
    <dt class="grid_2">备注：</dt>
    <dd class="grid_12"><%= f.text_area :remark %></dd>
  </dl>        
  <div class="grid_5 form_tool">
    <%= f.submit '保存' %>
    <%= link_to '返回', employees_users_url, :method => :get, :remote => true, :class => 'button' %>
  </div>
<% end %>